package chalmers.game.subterranean.model.physics;

import chalmers.game.subterranean.util.Direction;
import chalmers.game.subterranean.util.ExactPosition;

/**
 * Interface for movable bodies in the world.
 * 
 * @author Alex Evert
 */
public interface IMovableBody {

  public void moveBody(IPhysicsHandler physics);

  /**
   * See if there free space in the given direction.
   * 
   * @param direction Direction from body that we ask about.
   * @return True if free space found, false otherwise.
   */
  public boolean findFreeSpace(Direction direction);

  public void setXVelocity(double xVelocity);

  public double getXVelocity();

  public void setYVelocity(double yVelocity);

  public double getYVelocity();


  /**
   * Set a factor for how hard the gravity should pull.
   * 
   * @param factor The factor, 0.0 is no gravity 1.0 is noramal but higher allowed
   */
  public void setGravityfactor(double factor);

  public ExactPosition getExactPosition();

}
